OBJS = scanner.cmo ast.cmo parser.cmo interpret.cmo m.cmo

TARFILES = Makefile scanner.mll parser.mly \
	ast.mli interpret.ml m.ml \

m : $(OBJS)
	ocamlc -o m.exe $(OBJS)
	
#m : $(OBJS)
#	ocamlc -o m $(OBJS)

scanner.ml : scanner.mll
	ocamllex scanner.mll	
	
parser.ml parser.mli : parser.mly
	ocamlyacc parser.mly

%.cmo : %.ml
	ocamlc -c $<
	
%.cmi : %.mli
	ocamlc -c $<	

m.tar.gz : $(TARFILES)
	cd .. && tar czf src/m.tar.gz $(TARFILES:%=m/%)

.PHONY : clean
clean :
	del m.exe parser.ml parser.mli scanner.ml \
	*.cmo *.cmi	
	
#.PHONY : clean
#clean :
#	rm -f m parser.ml parser.mli scanner.ml \
#	*.cmo *.cmi

# Generated by ocamldep *.ml *.mli
ast.cmo: 
ast.cmx: 
interpret.cmo: ast.cmo 
interpret.cmx: ast.cmx 
m.cmo: scanner.cmo parser.cmi interpret.cmo \
    ast.cmo 
m.cmx: scanner.cmx parser.cmx interpret.cmx \
    ast.cmx 
parser.cmo: ast.cmo parser.cmi 
parser.cmx: ast.cmx parser.cmi 
scanner.cmo: parser.cmi 
scanner.cmx: parser.cmx 
parser.cmi: ast.cmo 